<?php

class UserLessons extends Zend_Db_Table {

    protected $_name = 'jos_elogo_user_lessons';
    
    public function getLessons($id,$order='is_accepted ASC') {
        $select = $this->select()->where('users_id=?', $id);
        $select->order("$order");
        $rows = $this->fetchAll('users_id='.$id,$order);
        return $rows;
    }
    

    public function showInfoUser($id) {
        $select = $this->fetchRow($this->select()
                                ->where('users_id=?', $id));
        if ($select) {
            return $select;
        } else {
            
        }
    }

}
